package com.xmls.server.mapper;

import com.xmls.server.entity.FaultNotice;
import com.xmls.server.entity.Result;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface NoticeMapper  {

    @Select("select * from FaultNotice")
    Result<List<FaultNotice>> findAll();

    @Select("select count(*) as Count from FaultNotice")
    Result<Integer> CountTotal();

    @Select("select count(*) as Count from FaultNotice where ExecuteStatus='执行'")
    int CountCompleted();

    //待处理
    @Select("select count(*) as Count from FaultNotice where ExecuteStatus='待分解'")
    int CountPending();

    //处理中
    @Select("select count(*) as Count from FaultNotice where ExecuteStatus='待分解'")
    int CountProcessing();

    @Select("select count(*) as Count from FaultNotice where ExecuteStatus='待分解'")
    int CountPendingApproval();

}
